<#compress>
    <#assign actionname>${(action=='create')?string('创建','编辑')}</#assign>
    <@override name="title">${actionname}会员</@override>
    <@override name="viewcss">
    <link href="${ctx}/static/admin/css/pages/portfolio.css" rel="stylesheet" type="text/css"/>
    <link href="${ctx}/static/scripts/plugins/kindeditor/themes/simple/simple.css" rel="stylesheet" type="text/css"/>
    </@override>
    <@override name="viewbody">
    <div class="row">
        <div class="col-md-12">
            <h3 class="page-title">
            ${actionname}会员
                <small>${actionname}会员.</small>
            </h3>
            <ul class="page-breadcrumb breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="${ctx}/admin/home">
                        首页
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="${ctx}/admin/member">
                        会员管理
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="#">
                    ${actionname}会员
                    </a>
                </li>
            </ul>
        </div>
    </div>

    <div class="portlet box blue">
        <div class="portlet-title">
            <div class="caption">
                <i class="fa fa-users"></i>会员信息
            </div>
        </div>
        <div class="portlet-body form">
            <form class="form-horizontal form-bordered form-row-stripped" action="${ctx}/admin/member/save" role="form" id="memberForm" method="post">
                <input name="member.id" type="hidden" value="${member.id!}"/>

                <div class="form-body">
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="memberName">会员名称:<span class="required">*</span></label>

                        <div class="col-md-9">
                            <input type="text" class="required form-control" placeholder="会员名称"
                                   name="member.name" id="memberName" value="${member.name!}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3" for="member_idcard">身份证号:<span class="required">*</span></label>

                        <div class="col-md-9">
                            <input type="text" class="required form-control" placeholder="身份证号"
                                   name="member.id_card" id="member_idcard" value="${member.id_card!}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="member_gender">会员性别:<span class="required">*</span></label>

                        <div class="col-md-9">

                            <div class="radio-list">
                                <label class="radio-inline">
                                    <input type="radio" <#if member.gender>checked="checked" </#if>
                                                                   name="member.gender" id="member_gender" value="1" > 男 </label>
                                <label class="radio-inline">
                                    <input type="radio" <#if member.gender>checked="checked" </#if>
                                           name="member.gender" id="member_gender0" value="0"> 女 </label>

                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="member_card_no">会员卡号: </label>

                        <div class="col-md-9">
                            <input type="text" class="form-control" placeholder="会员卡号"
                                   name="member.card_no" id="member_card_no" value="${member.card_no!}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="member_phone">手机号码: </label>

                        <div class="col-md-9">
                            <input type="text" class="form-control" placeholder="手机号码"
                                   name="member.phone" id="member_phone" value="${member.phone!}">
                        </div>
                    </div>
                    <div class="form-group">

                        <label class="col-md-3 control-label" for="member_rank">会员等级：</label>

                        <div class="col-md-9">
                            <select class="form-control input-medium select2me" id="member_rank"
                                    data-placeholder="请选择会员等级" name="member.rank">
                                <#if ranks??>
                                    <#list ranks as rank>
                                        <option value="${rank.id}">${rank.name}</option>
                                    </#list>
                                </#if>

                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="member_wxno">微信号: </label>

                        <div class="col-md-9">
                            <input type="text" class="form-control" placeholder="微信号"
                                   name="member.wx_no" id="member_wxno" value="${member.wx_no!}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="member_wxnickname">微信昵称: </label>

                        <div class="col-md-9">
                            <input type="text" class="form-control" placeholder="微信昵称"
                                   name="member.wx_nickname" id="member_wxnickname" value="${member.wx_nickname!}">
                        </div>
                    </div>

                </div>


                <div class="form-actions text-right">

                    <a class="btn default yellow-stripe" href="${ctx}/admin/member"><i
                            class="fa fa-arrow-circle-o-left"></i> 返回</a>
                    <input type="submit" value="保存" class="btn btn-primary">
                </div>

            </form>
        </div>
    </@override>

    <@override name="viewmodule">member_item</@override>
    <@extends name="../_basic/main.ftl"></@extends>
</#compress>